package com.yuanqi.service;

import com.yuanqi.domain.AccountsPayableNew;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;

public interface AccountsPayableNewService {
    
    // 分页查询应付账款
    Page<AccountsPayableNew> getAccountsPayablePage(
        String supplierName, 
        Integer overdueStatus, 
        LocalDate dueDate, 
        Pageable pageable
    );
    
    // 根据ID获取应付账款
    AccountsPayableNew getById(Long id);
    
    // 根据供应商ID获取应付账款
    List<AccountsPayableNew> getBySupplierId(Long supplierId);
    
    // 获取逾期应付账款
    List<AccountsPayableNew> getOverdueAccounts();
    
    // 创建应付账款
    AccountsPayableNew create(AccountsPayableNew accountsPayable);
    
    // 更新应付账款
    AccountsPayableNew update(Long id, AccountsPayableNew accountsPayable);
    
    // 删除应付账款
    void delete(Long id);
    
    // 获取统计数据
    Map<String, Object> getStatistics();
    
    // 获取总应付金额
    BigDecimal getTotalPayableAmount();
    
    // 获取总已付金额
    BigDecimal getTotalPaidAmount();
    
    // 获取总未付金额
    BigDecimal getTotalUnpaidAmount();
    
    // 获取逾期总金额
    BigDecimal getTotalOverdueAmount();
    
    // 获取供应商数量
    Long getSupplierCount();
    
    // 获取本月付款金额
    BigDecimal getThisMonthPaymentAmount();
}
